package org.catdroid.bomba.server.bean;

import java.util.ArrayList;

@SuppressWarnings("serial")
public class Players extends ArrayList<Player> {

	public Player getPlayer(String id) throws PlayerNotFoundException {
		for (Player p : this) {
			if (p.getId().equals(id)) {
				return p;
			}
		}
		throw new PlayerNotFoundException();
	}

	public class PlayerNotFoundException extends Exception {
	}
}
